////////////////////////////////////////////////////////////////////////////////
// Copyright 2006 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   USER
// AUTHOR           :   Victor Zheng 
// DATE CREATE      :   2006/02/01
// DESCRIPTION      :   a SEARCH FORM file for the function, USER
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2006/02/01   Victor Zheng    1.0                 source is generated.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.admin.userSetup.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.erp.framework.controller.form.SimpleSearchStyleForm;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>SearchForm</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to get the user search criteria input
* from the web browsers.
*
* @author          Victor Zheng 
* @version 1.0     2006/02/01
* @since           FrameWork 1.0
*
*/

// Note:
// Currently only generates the first 5 fields of a table
// (excluding the COMPANY_CODE field).
// However, this number can be set in GenConstants.NO_CRITERIA

public class UserSearchForm extends SimpleSearchStyleForm {

	//Searching Criteria Attributes (DB Table Name: T_USER)
	private String srchCompanyCode;                  //DB Column Name: COMPANY_CODE
	private String srchStatus;                       //DB Column Name: STATUS
	private String srchUserCodeFr;                   //DB Column Name: USER_CODE
	private String srchUserCodeTo;                   //DB Column Name: USER_CODE
	private String srchUserNameFr;                   //DB Column Name: USER_NAME
	private String srchUserNameTo;                   //DB Column Name: USER_NAME
	private String srchEmailFr;                      //DB Column Name: EMAIL
	private String srchEmailTo;                      //DB Column Name: EMAIL
	private String srchPasswordFr;                   //DB Column Name: PASSWORD
	private String srchPasswordTo;                   //DB Column Name: PASSWORD
	private String srchRoleGroupIdFr;                //DB Column Name: ROLE_GROUP_ID
	private String srchRoleGroupIdTo;                //DB Column Name: ROLE_GROUP_ID

	private String editUserCode;

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void validateSearch(ActionErrors errors) {

		try {

		} catch (Exception e) {
			Logger.logExceptions(this, e);
		}
	}

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      mapping      the action mapping
	* @param      formIn       the action form
	* @param      request      the http request
	* @param      response     the http response
	* @param      errors       the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void moreValidateSearch(ActionMapping mapping, ActionForm formIn,
		HttpServletRequest request, HttpServletResponse response, ActionErrors errors) {

		HttpSession session = request.getSession(false);

		try {

		} catch (Exception e) {
			Logger.logExceptions(this, e);
		}
	}

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to 
	* contain the character sequence currently represented by this 
	* object. This <code>String</code> is then returned. Subsequent 
	* changes to this object do not affect the contents of the 
	* <code>String</code>. 
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public String toString() {
		String pkStr = "PK: {srchUserCodeFr = " + this.srchUserCodeFr
			+ "\n, srchUserCodeTo = " + this.srchUserCodeTo + "}\n";

		String colStr = "COL: {srchUserNameFr = " + this.srchUserNameFr
			+ "\n, srchUserNameTo = " + this.srchUserNameTo
			+ "\n, srchEmailFr = " + this.srchEmailFr
			+ "\n, srchEmailTo = " + this.srchEmailTo
			+ "\n, srchPasswordFr = " + this.srchPasswordFr
			+ "\n, srchPasswordTo = " + this.srchPasswordTo
			+ "\n, srchRoleGroupIdFr = " + this.srchRoleGroupIdFr
			+ "\n, srchRoleGroupIdTo = " + this.srchRoleGroupIdTo + "}\n";

		String mandatoryStr = "{srchCompanyCode = " + this.srchCompanyCode
			+ "\n, srchStatus = " + this.srchStatus
			+ "}\n";

		String editStr = "{editUserCode = " + this.editUserCode + "}";

		return "toString() is:\n" + mandatoryStr + pkStr + colStr + editStr;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for searching criterias
	////////////////////////////////////////////////////////////////////////////////

	public String getSrchCompanyCode() {
		return this.srchCompanyCode;
	}

	public String getSrchStatus() {
		return this.srchStatus;
	}

	public String getSrchUserCodeFr() {
		return this.srchUserCodeFr;
	}

	public String getSrchUserCodeTo() {
		return this.srchUserCodeTo;
	}

	public String getSrchUserNameFr() {
		return this.srchUserNameFr;
	}

	public String getSrchUserNameTo() {
		return this.srchUserNameTo;
	}

	public String getSrchEmailFr() {
		return this.srchEmailFr;
	}

	public String getSrchEmailTo() {
		return this.srchEmailTo;
	}

	public String getSrchPasswordFr() {
		return this.srchPasswordFr;
	}

	public String getSrchPasswordTo() {
		return this.srchPasswordTo;
	}

	public String getSrchRoleGroupIdFr() {
		return this.srchRoleGroupIdFr;
	}

	public String getSrchRoleGroupIdTo() {
		return this.srchRoleGroupIdTo;
	}

	public String getEditUserCode() {
		return this.editUserCode;
	}

	public void setSrchCompanyCode(String srchCompanyCode) {
		this.srchCompanyCode = srchCompanyCode;
	}

	public void setSrchStatus(String srchStatus) {
		this.srchStatus = srchStatus;
	}

	public void setSrchUserCodeFr(String srchUserCodeFr) {
		this.srchUserCodeFr = srchUserCodeFr;
	}

	public void setSrchUserCodeTo(String srchUserCodeTo) {
		this.srchUserCodeTo = srchUserCodeTo;
	}

	public void setSrchUserNameFr(String srchUserNameFr) {
		this.srchUserNameFr = srchUserNameFr;
	}

	public void setSrchUserNameTo(String srchUserNameTo) {
		this.srchUserNameTo = srchUserNameTo;
	}

	public void setSrchEmailFr(String srchEmailFr) {
		this.srchEmailFr = srchEmailFr;
	}

	public void setSrchEmailTo(String srchEmailTo) {
		this.srchEmailTo = srchEmailTo;
	}

	public void setSrchPasswordFr(String srchPasswordFr) {
		this.srchPasswordFr = srchPasswordFr;
	}

	public void setSrchPasswordTo(String srchPasswordTo) {
		this.srchPasswordTo = srchPasswordTo;
	}

	public void setSrchRoleGroupIdFr(String srchRoleGroupIdFr) {
		this.srchRoleGroupIdFr = srchRoleGroupIdFr;
	}

	public void setSrchRoleGroupIdTo(String srchRoleGroupIdTo) {
		this.srchRoleGroupIdTo = srchRoleGroupIdTo;
	}

	public void setEditUserCode(String editUserCode) {
		this.editUserCode = editUserCode;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


}
